<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/tlds/c.tld" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>直营店管理</title>
	<link rel="stylesheet" type="text/css" href="../css/index.css"></link>
	<script src="../js/common.js"></script>
	<script src="../js/jquery.plugins/jquery.js"></script>
	
	<link rel="stylesheet" type="text/css" href="../js/jquery.plugins/easyui/css/default/easyui.css"></link>
	<link rel="stylesheet" type="text/css" href="../js/jquery.plugins/easyui/css/icon.css"></link>
	<script src="../js/jquery.plugins/easyui/jquery.easyui.min.js"></script>
	<script src="../js/jquery.plugins/easyui/easyui-lang-zh_CN.js"></script>
	<script src="../js/page.js"></script>
	<script>
		$(function(){
			buildPage( ${pager.page},${pager.pageSize},${pager.totalNum} , '${pager.queryString}' );
			$('.pageDiv').pagination({
			buttons:[{
				iconCls:'icon-add',
				text:'添加新店',
				handler:function(){
					window.location.href='get.ht';
				}
			}]});
		});
	</script>
</head>
<body>
	<!-- 导航部分 -->
	<div class="position">
	您当前的位置：系统管理 &gt;&gt; <a href="list.ht">直营店管理</a>
	</div>
	<!-- 导航部分结束 -->
	<!-- 搜索部分 -->
	<div style="float:right;margin-right:50px;">
		<form id="searchform" action="list.ht" method="post">
			<table class="search">
				<tr>
					<td>
					<label>直营店名称:</label>
					<input type="text" name="query[keyword]" value="${pager.query['keyword']}"/>
					<button class="small-btn" type="submit">搜索</button>
					<button class="medium-btn" type='button' onclick="forward('get.ht');">添加新店</button>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div class="clear"></div>
	<!-- 搜索部分结束 -->
	
	<!-- 列表部分 -->
	<!-- 分页 -->
	<div class="pageDiv"></div>
	<!-- 分页结束 -->
	<table class="list">
		<thead>
			<tr>
			<th>直营店名称 </th>
			<th>店铺地址</th>
			<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="company" items="${ models }">
			<tr>
				<td>${company.name }</td>
				<td>${company.address }</td>
				<td><a href="get.ht?id=${company.id}">修改</a> | <a href="javascript:toconfirm('delete.ht?id=${company.id}');">删除</a></td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<!-- 分页 -->
	<div class="pageDiv"></div>
	<!-- 分页结束 -->
	<!-- 列表部分结束 -->
</body>
</html>